﻿@model Citi.Scheduler.WebUi.Models.DailyExecutionFilterModel
@using (Ajax.BeginForm("StatusExecution", new AjaxOptions { UpdateTargetId = "executionResults" }))
{
    @Html.ValidationSummary(true)
    <fieldset style="border: 0px none;">
        <legend>Filter</legend>
        <div class="floatLeft" style="width: 33%">
            <div>
                @Html.LabelFor(model => model.RoutineName)
                @Html.TextBoxFor(model => model.RoutineName)
                @Html.ValidationMessageFor(model => model.RoutineName)
            </div>
            <div>
                @Html.LabelFor(model => model.MachineId)
                @Html.DropDownListFor(model => model.MachineId, (SelectList)ViewBag.Machines)
                @Html.ValidationMessageFor(model => model.MachineId)
            </div>
        </div>
        <div class="floatLeft" style="width: 33%">
            <div>
                @Html.LabelFor(model => model.StartDate)
                @Html.TextBoxFor(model => model.StartDate, new { @class = "date" })
                @Html.ValidationMessageFor(model => model.StartDate)
            </div>
            <div>
                @Html.LabelFor(model => model.ResponsibleId)
                @Html.DropDownListFor(model => model.ResponsibleId, (SelectList)ViewBag.Responsibles)
                @Html.ValidationMessageFor(model => model.ResponsibleId)
            </div>
        </div>
        <div class="floatLeft" style="width: 33%">
            <div>
                @Html.LabelFor(model => model.EndDate)
                @Html.TextBoxFor(model => model.EndDate, new { @class = "date" })
                @Html.ValidationMessageFor(model => model.EndDate)
            </div>
            <div>
                @Html.LabelFor(model => model.CategoryId)
                @Html.DropDownListFor(model => model.CategoryId, (SelectList)ViewBag.Categories)
                @Html.ValidationMessageFor(model => model.CategoryId)
                <br />
                @Html.CheckBoxFor(model => model.IncludeCategoryChildren) Include All Hierarchy
            </div>
        </div>
        @Html.HiddenFor(model => model.ExecutionToShow)
        @Html.HiddenFor(model => model.LibraryType)
        <p>
            <input type="submit" value="Search" class="btn btn-primary" />
        </p>
    </fieldset>
}
